/*package com.szrt.oa.user.dao.impl;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

import com.szrt.oa.user.dao.UserDao;
import com.szrt.oa.user.entity.UserEntity;

public class UserDaoImpl implements UserDao{

	
	@Override
	public UserEntity findById(String phone) throws Exception {
		
		UserEntity entity=new UserEntity();
		String sql="SELECT u.USERNAME as username, u.ID as id, u.DEPARMENT_ID as deparmentId FROM oa_user_t AS u WHERE u.PHONE =?";
		PreparedStatement ps = conn.prepareStatement(sql);
		ps.setString(1,phone);
		ResultSet rs = ps.executeQuery();
		if(rs.next()){
			entity.setId(rs.getInt("id"));
			entity.setUsername(rs.getString("username"));
			entity.setDeparment_id(rs.getInt("deparmentId"));
		}
		rs.close();
		ps.close();
		
		return entity;
	}



}
*/